package fhjoanneum.itm11.antesk.simplehack;

public class DoorTile extends Tile
{
	// Members -----------------------------------------------------------
	private boolean locked;
	private boolean opened;
	private String TestOpen;
	
	// Default Constructor -----------------------------------------------
	DoorTile()
	{
		this(false, false);
	}
	
	// Copy Constructor --------------------------------------------------
	DoorTile(boolean locked, boolean opened)
	{
		setCharacter(null);
		setTest("H");
		setTestOpen("|");
		this.locked = locked;
		if(this.locked == true) // door can never be locked and open at the
		{												// same time
			this.opened = false;
		}
	}
	
	// Getters and setters ----------------------------------------------- 
	public boolean getLocked(){return this.locked;}
	public void setLocked(boolean locked){this.locked = locked;}
	public boolean getOpened(){return this.opened;}
	public void setOpened(boolean opened){this.opened = opened;}
	public String getTestOpen(){return this.TestOpen;}
	public void setTestOpen(String test){this.TestOpen = test;}
	public TileType getTileType(){return TileType.DOOR;}
	
	public boolean isEntryPossible()
	{
		if(this.opened == true)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
}
